import fetch from 'utils/fetch'

export default { // 招商
  dict (params) { // 字典数据
    return fetch({
      url: params,
      params: params
    })
  },
  merchants_list (params) { // 招商计划列表
    return fetch({
      url: '/sponsored/org/mer/list/select',
      params
    })
  },
  merchants_add (data, options) { // 新增招商计划
    return fetch({
      url: '/sponsored/org/mer/insert',
      method: 'post',
      data,
      options
    })
  },
  merchants_changestate (params) { // 招商计划列表-修改状态 开关状态方法
    return fetch({
      url: '/sponsored/org/mer/merStatus/update',
      method: 'put',
      params: params
    })
  },
  merchants_del (params) { // 招商计划列表 删除
    return fetch({
      url: '/sponsored/org/mer/sponsorBase/delete',
      method: 'delete',
      params: params
    })
  },
  base_update (data, options) { // 更新赞助基本信息 tab1
    return fetch({
      url: '/sponsored/org/mer/base/update',
      method: 'put',
      dataType: 'json',
      data,
      options
    })
  },
  details_update (data, options) { // 更新赞助详情信息 tab2
    return fetch({
      url: '/sponsored/org/mer/details/update',
      method: 'put',
      dataType: 'json',
      data,
      options
    })
  },
  rights_update (data, options) { // 更新赞助详情信息 tab3
    return fetch({
      url: '/sponsored/org/mer/rights/update',
      method: 'put',
      dataType: 'json',
      data,
      options
    })
  },
  submitAudit_update (data, options) { // 修改页的提交审核
    return fetch({
      url: '/sponsored/org/mer/submitAudit/update',
      method: 'put',
      dataType: 'json',
      data,
      options
    })
  },
  sport_type (params) { // 比赛项目
    return fetch({
      url: '/sponsored/guest/dict/sport/type',
      method: 'get',
      params: params
    })
  },
  merchants_details (params) { // 获得指定赞助ID的详情数据
    return fetch({
      url: '/sponsored/org/mer/details/select',
      method: 'get',
      params: params
    })
  },
  bid_list (params) { // 招商管理  竞标列表
    return fetch({
      url: '/sponsored/org/bid/bidDetailsInfo',
      params
    })
  },
  bid_save (params) { // 招商管理 确定中标
    return fetch({
      url: '/sponsored/org/bid/status/update',
      method: 'put',
      params
    })
  },
  bid_startTime (data, options) { // 招商管理  设置时间
    return fetch({
      url: '/sponsored/org/bid/startTime/update',
      method: 'put',
      dataType: 'json',
      data,
      options
    })
  },
  bid_Refused (params) { // 招商管理 竞标拒绝
    return fetch({
      url: '/sponsored/org/bid/loseBid/update',
      method: 'put',
      dataType: 'json',
      params
    })
  },
  bidfodder_list (params) { // 招商管理 附件列表
    return fetch({
      url: '/sponsored/org/mer/bidfodder/all',
      params
    })
  },
  manage_detail (params) { // 招商管理 招商头部信息
    return fetch({
      url: '/sponsored/org/mer/header/select',
      params
    })
  },
  downloadFile (params) { // 招商管理 招商头部信息
    return fetch({
      url: '/download/file',
      params
    })
  },
  compact_list (params) { // 合同管理列表
    return fetch({
      url: '/sponsored/org/contract/list/select',
      params
    })
  },
  sponsorship_list (params) { // 合同赞助列表
    return fetch({
      url: '/sponsored/org/contract/paymentMangerInfo',
      params
    })
  },
  signing_contract (data, options) { // 合同管理-签署合同
    return fetch({
      url: '/sponsored/org/contract/sign',
      method: 'post',
      data,
      options
    })
  },
  fulfil_list (params) { // 合同履行列表
    return fetch({
      url: '/sponsored/org/contract/execute/list',
      params
    })
  },
  fulfil_status (params) { // 合同履行状态
    return fetch({
      url: '/sponsored/org/contract/execute/updateStatus',
      method: 'put',
      dataType: 'json',
      params
    })
  },
  rightType (params) { // 合同履行页面-所属权益下拉菜单
    return fetch({
      url: '/sponsored/org/contract/rightType/',
      params
    })
  },
  exportExcel (params) { // 导出合同履行明细列表
    return fetch({
      url: '/sponsored/org/contract/executeList/export',
      params
    })
  },
  confirm_pay (params) { // 合同赞助-确认收款
    return fetch({
      url: '/sponsored/org/contract/confirmReceipt',
      method: 'put',
      dataType: 'json',
      params
    })
  },
  contract_details (params) { // 合同履行状态
    return fetch({
      url: '/sponsored/org/contract/bidDetails/id',
      params
    })
  },
  contract_close (data, options) { // 关闭合同
    return fetch({
      url: '/sponsored/org/contract/close',
      method: 'put',
      dataType: 'json',
      data,
      options
    })
  },
  contract_details_edit (params) { // 合同履行状态
    return fetch({
      url: '/sponsored/org/contract/detail/id',
      params
    })
  },
  contract_add (data, options) { // 拟定合同
    return fetch({
      url: '/sponsored/org/contract/insert',
      method: 'post',
      data,
      options
    })
  },
  remind_payment (data, options) { // 合同赞助-提醒付款
    return fetch({
      url: '/sponsored/org/contract/remindPayment',
      method: 'post',
      data,
      options
    })
  },
  contract_preview_save (data, options) { // 预览存入数据
    return fetch({
      url: '/sponsored/org/contract/preview/save',
      method: 'post',
      data,
      options
    })
  },
  contract_preview_show (params) { // 预览查看图片 - 编辑中
    return fetch({
      url: '/sponsored/org/contract/preview/',
      params
    })
  },
  contract_list_preview_show (params) { // 预览查看图片 - 合同列表
    return fetch({
      url: '/sponsored/org/contract/preview/id',
      params
    })
  }
}
